package sugarbind_input

class AreaController {

    def scaffold = true
	
	def findAreas = {
		println("findAreas params : " +params)
			
		def areas = Area.listAreas()
		def selected


		try
		{
			selected = Area.get(params.area)
		}
		catch(Exception ex)
		{
			println(ex.getMessage())
		}
		println(areas)
		println("selected areas : "+selected)
		
		render(template: 'ddlAreas', model:  [areas : areas, selected:selected])
	  }
}
